import { Login } from "@/api/interface/index";
import { PORT1 } from "@/api/config/servicePort";
import http from "@/api";
// 查询列表
export const getDataByPage = (params: Login.ReqLoginForm) => {
  return http.post<Login.ResLogin>(PORT1 + `/secure/ifaceLink`, params, { loading: true }); // 正常 post json 请求  ==>  application/json
};
// 删除列表
export const deleteData = (params: Login.ReqLoginForm) => {
  return http.post<Login.ResLogin>(PORT1 + `/common/login`, params, { loading: false }); // 正常 post json 请求  ==>  application/json
};
// 获取所有链路
export const ifaceAll = () => {
  return http.get<Login.ResLogin>(PORT1 + `/secure/ifaceAll`, {}, { loading: false }); // 正常 post json 请求  ==>  application/json
};
// 获取所有链路
export const ifacemodeUpdate = params => {
  return http.post<Login.ResLogin>(PORT1 + `/admin/ifaceSave`, params, { loading: false }); // 正常 post json 请求  ==>  application/json
};
// 获取所有链路
export const ifaceList = params => {
  return http.post<Login.ResLogin>(PORT1 + `/admin/ifaceList`, params, { loading: false }); // 正常 post json 请求  ==>  application/json
};
// 获取所有链路
export const ifaceLinkUpdate = params => {
  return http.post<Login.ResLogin>(PORT1 + `/admin/ifaceLinkUpdate`, params, { loading: false }); // 正常 post json 请求  ==>  application/json
};
// 获取信息
export const ifaceAttrGet = params => {
  return http.get<Login.ResLogin>(PORT1 + `/secure/ifaceAttrGet/${params.ifid}`, {}, { loading: false }); // 正常 post json 请求  ==>  application/json
};
// 设置信息
export const ifaceAttrSet = params => {
  return http.post<Login.ResLogin>(PORT1 + `/secure/ifaceAttrSet`, params, { loading: false }); // 正常 post json 请求  ==>  application/json
};
// 设置信息
export const subifaceAdd = params => {
  return http.post<Login.ResLogin>(PORT1 + `/secure/subifaceAdd`, params, { loading: false }); // 正常 post json 请求  ==>  application/json
};
